// 实现对localstorage的封装操作
export const getItem = name => JSON.parse(localStorage.getItem(name))
// export const getItem = name => {
//   console.log(name)
//   console.log(localStorage.getItem(name))
//   return JSON.parse(localStorage.getItem(name))
// }
export const setItem = (name, obj) => {
  // 对象数据的字符串
  return localStorage.setItem(name, JSON.stringify(obj))
}
export const removeItem = name => {
  return localStorage.removeItem(name)
}
